#include "mainwindow.h"
#include <QApplication>
#include <QtCore/QDir>
#include <QtCore/QVariant>

#include <pluginmanager.h>

static QString getPluginPath()
{
    // Figure out root:  Up one from 'bin'
    QDir rootDir = QApplication::applicationDirPath();
    rootDir.cdUp();
    QString rc = rootDir.canonicalPath();
    rc += QLatin1Char('/');
    rc += QLatin1String("plugins");
    return rc;
}

int main(int argc, char *argv[])
{
    PluginManager pluginManager;
    pluginManager.setPluginPath(getPluginPath());
    pluginManager.loadPlugins();

    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}


